resource "google_compute_network" "default" {
  name = "<%= ctx[:vars]['network_name'] %>"
}

resource "google_compute_subnetwork" "default" {
  name          = "<%= ctx[:vars]['subnetwork_name'] %>"
  ip_cidr_range = "10.0.0.0/16"
  region        = "us-central1"
  network       = google_compute_network.default.id
}

resource "google_compute_address" "<%= ctx[:primary_resource_id] %>" {
  name         = "<%= ctx[:vars]['address_name'] %>"
  subnetwork   = google_compute_subnetwork.default.id
  address_type = "INTERNAL"
  address      = "10.0.42.42"
  region       = "us-central1"
}
